package com.springapp.model;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * Created with IntelliJ IDEA.
 */
@Entity
@Table(name = "DESK")
public class Desk extends BaseEntity implements Serializable {

    @Enumerated(EnumType.STRING)
    @Column(name = "DESK_STATUS")
    private Status status;

    @Column(name = "DESK_X")
    private int positionX;

    @Column(name = "DESK_Y")
    private int positionY;

    @Enumerated(EnumType.STRING)
    @Column(name = "SHAPE")
    private Shape shape;
    
    @OneToOne
    @JoinColumn(name = "ORDER_ID")
    private Order order;

    public Desk() {}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

	public int getPositionX() {
		return positionX;
	}

	public void setPositionX(int positionX) {
		this.positionX = positionX;
	}

	public int getPositionY() {
		return positionY;
	}

	public void setPositionY(int positionY) {
		this.positionY = positionY;
	}

	public Shape getShape() {
		return shape;
	}

	public void setShape(Shape shape) {
		this.shape = shape;
	}

	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}
   
}
